#include <stdio.h>
#include <stdlib.h>

typedef int SLTDataTyte;

typedef struct SListNode
{
	SLTDataTyte data;
	struct SLisTNode* next;
}SLTNode;

void SLTPrint(SLTNode* phead)
{
	SLTNode* cur = phead;
	while (cur != NULL)
	{
		printf("%d -> ", cur->data);
		cur = cur->next;
	}
	printf("NULL\n");
}

void SLPushFront(SLTNode** pphead, SLTDataTyte x)
{
	SLTNode* newnode = (SLTNode*)malloc(sizeof(SLTNode));
	if (newnode == NULL)
	{
		perror("malloc fail");
		return;
	}
	newnode->data = x;
	newnode->next = NULL;

	newnode->next = *pphead;
	*pphead = newnode;
}
